package sctu.edu.java.year2016.team08.zengshenjing.day20160522.chapter4_3;

/**
 * Created by Administrator on 2016/5/22.
 *
 */
public class chapter4_3 {
        public static void main(String[] args) {
            int b=1,i=0;
            double sum=0;
            while(i<20) {

                sum = sum + (double)1/ b;
                b = b * (i+2);
                i++;
            }
            System.out.print("1+1/2！+1/3！...+1/20！之和为："+sum);
        }
    }


